﻿using RoslynEvalApp.Models.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RoslynEvalApp.Controllers.EventHandlers
{
    class UIEventController : IUIEventController
    {
        public static IService CreateService(Type serviceType)
        {
            IService instance = Activator.CreateInstance(serviceType) as IService;

            return instance;
        }

        public void RequestRoslynEval()
        {
            IService service = CreateService(typeof(RoslynEvalService));
            service.Execute(null);
        }
    }
}
